package com.kdg.fanxing;

/**
 * Created by kong on 2018/6/15.
 */
public class BoxTest {
    public static void main(String[] args) {
        Box<Integer> integerBox = new Box<>();
        Box<String> stringBox = new Box<>();

//        泛型类型在逻辑上看以看成是多个不同的类型，实际上都是相同的基本类型。
        System.out.println(integerBox.getClass()); //class com.kdg.fanxing.Box
        System.out.println(stringBox.getClass());  //class com.kdg.fanxing.Box

        Pair<Integer, String> kkk = new Pair<>(1, "kkk");
        Pair<Integer, String> ddd = new Pair<>(2, "kkk");
        boolean compare = Util.compare(kkk, ddd);
        System.out.println(compare);
    }
}
